
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import TaskActioninfoBase from './actioninfo-portlet-base.vue';

 
@Component({
    components: {
         
    }
})
export default class TaskActioninfo extends TaskActioninfoBase {

    public afterCreated(){
        let _this = this;
        if (_this.viewState) {
            _this.viewStateEvent = _this.viewState.subscribe(({ tag, action, data }) => {
                if (!Object.is(tag, _this.name)) {
                    return;
                }
                const refs: any = _this.$refs;
                Object.keys(refs).forEach((_name: string) => {
                    _this.viewState.next({ tag: _name, action: action, data: data });
                });

                if(Object.is(action, 'getActionData')){
                    let appTaskActiondata: any = this.$refs.appTaskActiondata;
                    if(appTaskActiondata && appTaskActiondata.searchActionByTask){
                        appTaskActiondata.searchActionByTask(data);
                    }
                }

            });
        }
    }

}
</script>
